package com.lgx.mall.business.service;

import com.lgx.common.web.Pagination;
import com.lgx.mall.business.entity.Order;

public interface IOrderService {
	/**
	 * 分页查询
	 * @param rebateStarTime
	 * @param rebateEndTime
	 * @param pageSize
	 * @param pageNum
	 * @return
	 */
	public Pagination findOrderPagination(String username,String usercard,String orderNumber,String starTime,String endTime,String status, int pageSize, int pageNum);
	public Pagination findOrderPagination(Long userId, int pageSize, int pageNum);
	public Order findOrderById(Long orderId);
	public void deleteOrder(Order order); 
	public void updateOrder(Order order);
	public Order createOrder(Order order); 
	
	/**
	 * 获取用户的购物车
	 * 
	 * @param userId
	 * @return
	 */
	public Order findOrderByUserId(long userId);
	
	/**
	 * 
	 * 
	 * @param userId
	 * @param entityId
	 * @param entityType
	 * @return
	 */
	public Order addOrderDetail(long userId,String entityId,String entityType,String description);
	
	/**
	 * 订单号获取订单
	 * 
	 * @param orderNo
	 * @return
	 */
	public Order findOrderByOrderNo(String orderNo);
	
}
